package com.zeng.rest;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

public class RestClientGetDemo {

    public static void main(String[] args) {
        Client client = ClientBuilder.newClient();
        Response response = client
                .target("http://baidu.com")        // WebTarget
                .request()                                              // Invocation.Builder
                .get();                                                 //  Response

        String content = response.readEntity(String.class);

        System.out.println(content);

    }
}
